<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flex:1</title>
</head>

<body>
    <div class="container">
        <div class="div">我是一个div</div>
        <div class="div">我是一个很多字div</div>
        <div class="div">我是一个更多字而且第三个div</div>
    </div>
    <style>
        .container {
            display: flex;
        }

        .div {
            border: 1px solid gainsboro;
            flex: 1;
        }
    </style>
</body>

</html>